﻿@{
    ViewBag.Title = "Index";
}

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width" />
    <title>功能菜单</title>
    @*添加Jquery EasyUI的样式*@
    <link href="~/Content/JqueryEasyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/JqueryEasyUI/themes/icon.css" rel="stylesheet" type="text/css" />

    <link href="~/Content/themes/Default/style.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/themes/Default/default.css" rel="stylesheet" type="text/css" />

    @*添加Jquery，EasyUI和easyUI的语言包的JS文件*@
    <script type="text/javascript" src="~/Content/JqueryEasyUI/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/JqueryEasyUI/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="~/Content/JqueryEasyUI/locale/easyui-lang-zh_CN.js"></script>

    @*日期格式的引用*@
    <script src="~/Content/datapattern.js"></script>
    <link href="~/Content/JQueryTools/JQueryTree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
    <script src="~/Content/JQueryTools/JQueryTree/js/jquery.ztree.core-3.5.min.js" type="text/javascript"></script>
        <script src="~/ViewScript/Menu.js"></script>
    <style>
        table.view {border:1px solid #A8CFEB;border-collapse: collapse;margin-bottom:5px;}
        .view th{ padding-left:10px;padding-right:5px;padding-top:5px;padding-bottom:5px;height:23px;width: 150px;border: 1px solid silver;background-color:#F1F6FF;}
        .view td{ padding-left:10px;padding-right:5px;padding-top:5px;padding-bottom:5px;height:23px;width: 150px;border: 1px solid silver;background-color:#FAFCFF;}
    </style>
    </head>
<body>
    <div id="loading" style="display: none;"><img alt="数据正在加载中..." src="~/Content/images/loading02.gif" /></div>
    <div class="easyui-layout" style="width:700px;height:700px;" fit="true">
        <div data-options="region:'west',split:true,title:'菜单管理',iconCls:'icon-book'" style="width: 250px; padding: 1px;">
            <div style="padding: 1px; border: 1px solid #ddd;">                
                <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" id="A4" onclick="reloadTree()">刷新</a>
                <a id="expandAllBtn" href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-expand'" id="A5" onclick="return false;">展开</a>
                <a id="collapseAllBtn" href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-collapse'" id="A6" onclick="return false;">折叠</a>
            </div>
            <div>
                <ul id="treeDemo" class="ztree">
                </ul>
            </div>
        </div>
        <div id="tb" data-options="region:'center',title:'',iconCls:'icon-book'" style="padding:5px;height:auto">       
            <!-------------------------------搜索框----------------------------------->
            <fieldset>
                <legend>信息查询</legend>
                <form id="ffSearch" method="post">
		            <div style="margin-bottom:5px">	                     
                        <label for="txtName">显示名称：</label>
                        <input type="text" ID="txtName" name="txtName" style="width:100px"  />&nbsp;&nbsp;&nbsp;
                        <label for="txtIcon">Winform图标：</label>
                        <input type="text" ID="txtIcon" name="txtIcon" style="width:100px"  />&nbsp;&nbsp;&nbsp;
                        <label for="txtSeq">排序：</label>
                        <input type="text" ID="txtSeq" name="txtSeq" style="width:100px"  />&nbsp;&nbsp;&nbsp;
                        <label for="txtFunctionId">功能ID：</label>
                        <input type="text" ID="txtFunctionId" name="txtFunctionId" style="width:100px"  />&nbsp;&nbsp;&nbsp;
                    </div>
                    <div>                    
                        <label for="txtWinformType">Winform窗体：</label>
                        <input type="text" ID="txtWinformType" name="txtWinformType" style="width:100px"  />&nbsp;&nbsp;&nbsp;
                        <label for="txtUrl">Web界面Url：</label>
                        <input type="text" ID="txtUrl" name="txtUrl" style="width:100px"  />&nbsp;&nbsp;&nbsp;
                        <label for="txtWebIcon">Web界面图标：</label>
                        <input type="text" ID="txtWebIcon" name="txtWebIcon" style="width:100px"  />&nbsp;&nbsp;&nbsp;
                        
                         <a href="#" class="easyui-linkbutton" iconcls="icon-search" id="btnSearch">查询</a>
                    </div>

                </form>
            </fieldset>
                
            <!-------------------------------详细信息展示表格----------------------------------->
            <table id="grid" style="width: 1024px" title="用户操作" iconcls="icon-view">            
            </table>
        </div>
   </div>

    <!--------------------------添加信息的弹出层---------------------------->
    <div id="DivAdd" class="easyui-dialog" style="width:780px;height:300px;padding:10px 20px"
			closed="true" resizable="true" modal="true" data-options="iconCls: 'icon-add',buttons: '#dlg-buttons'">
        <form id="ffAdd" method="post" novalidate="novalidate">
                <table id="tblAdd" class="view">
                    <tr>
                        <th>
                            <label for="PID">父菜单：</label>
                        </th>
                        <td>
                            <input class="easyui-combobox" type="text" id="PID" style="width:200px" name="PID" data-options="required:true,validType:'length[1,50]'" />
                        </td>
                        <th>
                            <label for="SystemType_ID">系统编号：</label>
                        </th>
                        <td>
                            <input class="easyui-combobox" type="text" id="SystemType_ID" name="SystemType_ID" data-options="required:true,validType:'length[1,50]'" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <label for="Name">显示名称：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="Name" name="Name" data-options="required:true,validType:'length[1,50]'" />
                        </td>

                        <th>
                            <label for="Icon">Winform菜单图标：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="Icon" name="Icon" />
                        </td>

                    </tr>
                    <tr>
                        <th>
                            <label for="Seq">排序：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="Seq" name="Seq" />
                        </td>

                        <th>
                            <label for="FunctionId">功能ID：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="FunctionId" name="FunctionId" />
                        </td>

                    </tr>
                    <tr>
                        <th>
                            <label for="Visible">菜单可见：</label>
                        </th>
                        <td>
                            <select  id="Visible" name="Visible">
                                <option value="true" selected>正常</option>
                                <option value="false">不可见</option>
                            </select>
                        </td>

                        <th>
                            <label for="WinformType">Winform窗体类型：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="WinformType" name="WinformType" />
                        </td>

                    </tr>
                    <tr>
                        <th>
                            <label for="Url">Web界面Url地址：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="Url" name="Url" />
                        </td>

                        <th>
                            <label for="WebIcon">Web界面的菜单图标：</label>
                        </th>
                        <td>
                            @*<input class="easyui-validatebox" type="text" id="WebIcon" name="WebIcon" />*@
                            <table>
                                <tr>
                                    <td>
                                        <select id="WebIcon" name="WebIcon"  onchange="javascript:changeIcon()">
                                            <option>icon-blank</option>
                                            <option>icon-add</option>
                                            <option>icon-edit</option>
                                            <option>icon-remove</option>
                                            <option>icon-save</option>
                                            <option>icon-cut</option>
                                            <option>icon-ok</option>
                                            <option>icon-no</option>
                                            <option>icon-cancel</option>
                                            <option>icon-reload</option>
                                            <option>icon-search</option>
                                            <option>icon-print</option>
                                            <option>icon-help</option>
                                            <option>icon-undo</option>
                                            <option>icon-redo</option>
                                            <option>icon-back</option>
                                            <option>icon-sum</option>
                                            <option>icon-tip</option>
                                            <option>icon-mini-add</option>
                                            <option>icon-mini-edit</option>
                                            <option>icon-mini-refresh</option>
                                            <option>icon-excel</option>
                                            <option>icon-word</option>
                                            <option>icon-organ</option>
                                            <option>icon-lock</option>
                                            <option>icon-alarm</option> 
                                            <option>icon-view</option>
                                            <option>icon-pie</option>
                                            <option>icon-bar</option>
                                            <option>icon-curve</option>
                                            <option>icon-computer</option>
                                            <option>icon-house</option>
                                            <option>icon-key</option>
                                            <option>icon-photo</option>
                                            <option>icon-user</option>
                                            <option>icon-group</option>
                                            <option>icon-group-key</option>
                                            <option>icon-telephone</option>
                                            <option>icon-phone</option>
                                            <option>icon-table</option>
                                            <option>icon-book</option>
                                            <option>icon-comment</option>
                                            <option>icon-date'</option>
                                            <option>icon-email</option>
                                            <option>icon-first</option>
                                            <option>icon-last</option>
                                            <option>icon-next</option>
                                            <option>icon-previous</option>
                                            <option>icon-stop</option>
                                            <option>icon-setting</option>
                                        </select>
                                    </td>
                                    <td><div id="imgIcon" class="icon-blank" style="width:24px;height:24px"/></td>
                                </tr>
                            </table>  
                        </td>

                    </tr>
 
                    <tr>
                        <td colspan="4" style="text-align:right; padding-top:10px">
                            <a href="javascript:void(0)" class="easyui-linkbutton" id="btnAddOK" iconcls="icon-ok" >确定</a>
                            <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#DivAdd').dialog('close')">关闭</a>
                        </td>
                    </tr>
                </table>
        </form>
    </div>

    <!--------------------------编辑信息的弹出层---------------------------->
    <div id="DivEdit" class="easyui-dialog" style="width:780px;height:300px;padding:10px 20px"
			closed="true" resizable="true" modal="true" data-options="iconCls: 'icon-edit',buttons: '#dlg-buttons'">
        <form id="ffEdit" method="post" novalidate="novalidate">
                <table id="tblEdit" class="view">
                    <tr>
                        <th>
                            <label for="PID1">父ID：</label>
                        </th>
                        <td>
                            <input class="easyui-combobox" type="text" style="width:200px" id="PID1" name="PID" data-options="required:true,validType:'length[1,50]'"/>
                        </td>
                        <th>
                            <label for="SystemType_ID1">系统编号：</label>
                        </th>
                        <td>
                            <input class="easyui-combobox" type="text" id="SystemType_ID1" name="SystemType_ID" data-options="required:true,validType:'length[1,50]'"/>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <label for="Name1">显示名称：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="Name1" name="Name" data-options="required:true,validType:'length[1,50]'"/>
                        </td>

                        <th>
                            <label for="Icon1">Winform菜单图标：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="Icon1" name="Icon" />
                        </td>

                    </tr>
                    <tr>
                        <th>
                            <label for="Seq1">排序：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="Seq1" name="Seq" />
                        </td>

                        <th>
                            <label for="FunctionId1">功能ID：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="FunctionId1" name="FunctionId" />
                        </td>

                    </tr>
                    <tr>
                        <th>
                            <label for="Visible1">菜单可见：</label>
                        </th>
                        <td>
                            <select  id="Visible1" name="Visible">
                                <option value="true" selected>正常</option>
                                <option value="false">不可见</option>
                            </select>
                        </td>

                        <th>
                            <label for="WinformType1">Winform窗体类型：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="WinformType1" name="WinformType" />
                        </td>

                    </tr>
                    <tr>
                        <th>
                            <label for="Url1">Web界面Url地址：</label>
                        </th>
                        <td>
                            <input class="easyui-validatebox" type="text" id="Url1" name="Url" />
                        </td>

                        <th>
                            <label for="WebIcon1">Web界面的菜单图标：</label>
                        </th>
                        <td>
                            @*<input class="easyui-validatebox" type="text" id="WebIcon1" name="WebIcon" />*@
                            <table>
                                <tr>
                                    <td>
                                        <select id="WebIcon1" name="WebIcon" onchange="javascript:changeIcon()">
                                            <option>icon-blank</option>
                                            <option>icon-add</option>
                                            <option>icon-edit</option>
                                            <option>icon-remove</option>
                                            <option>icon-save</option>
                                            <option>icon-cut</option>
                                            <option>icon-ok</option>
                                            <option>icon-no</option>
                                            <option>icon-cancel</option>
                                            <option>icon-reload</option>
                                            <option>icon-search</option>
                                            <option>icon-print</option>
                                            <option>icon-help</option>
                                            <option>icon-undo</option>
                                            <option>icon-redo</option>
                                            <option>icon-back</option>
                                            <option>icon-sum</option>
                                            <option>icon-tip</option>
                                            <option>icon-mini-add</option>
                                            <option>icon-mini-edit</option>
                                            <option>icon-mini-refresh</option>
                                            <option>icon-excel</option>
                                            <option>icon-word</option>
                                            <option>icon-organ</option>
                                            <option>icon-lock</option>
                                            <option>icon-alarm</option> 
                                            <option>icon-view</option>
                                            <option>icon-pie</option>
                                            <option>icon-bar</option>
                                            <option>icon-curve</option>
                                            <option>icon-computer</option>
                                            <option>icon-house</option>
                                            <option>icon-key</option>
                                            <option>icon-photo</option>
                                            <option>icon-user</option>
                                            <option>icon-group</option>
                                            <option>icon-group-key</option>
                                            <option>icon-telephone</option>
                                            <option>icon-phone</option>
                                            <option>icon-table</option>
                                            <option>icon-book</option>
                                            <option>icon-comment</option>
                                            <option>icon-date'</option>
                                            <option>icon-email</option>
                                            <option>icon-first</option>
                                            <option>icon-last</option>
                                            <option>icon-next</option>
                                            <option>icon-previous</option>
                                            <option>icon-stop</option>
                                            <option>icon-setting</option>
                                        </select>
                                    </td>
                                    <td><div id="imgIcon1" class="icon-blank" style="width:24px;height:24px"/></td>
                                </tr>
                            </table>  
                        </td>

                    </tr>
 
                    <tr>
                        <td colspan="4" style="text-align:right; padding-top:10px">
                            <input type="hidden" id="ID1" name="ID" />
                            <a href="javascript:void(0)" class="easyui-linkbutton" id="btnEditOK" iconcls="icon-ok" >确定</a>
                            <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#DivEdit').dialog('close')">关闭</a>
                        </td>
                    </tr>
                </table>
            </fieldset>

        </form>
    </div>

    <!--------------------------查看详细信息的弹出层---------------------------->
    <div id="DivView" class="easyui-dialog" style="width:800px;height:300px;padding:10px 20px"
			closed="true" resizable="true" modal="true" data-options="iconCls: 'icon-view',buttons: '#dlg-buttons'">
        <form id="ffView" method="post" novalidate="novalidate">
                <table id="tblView" class="view">
                    <tr>        
                        <th width="20%">
                            <label for="PID2">父菜单：</label>
                        </th>
                        <td width="30%">
                            <label id="PID2" />
                        </td>
                        <th width="20%">
                            <label for="SystemType_ID2">系统编号：</label>
                        </th>
                        <td width="30%">
                            <label id="SystemType_ID2" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <label for="Name2">显示名称：</label>
                        </th>
                        <td>
                            <label id="Name2" />
                        </td>

                        <th>
                            <label for="Icon2">Winform菜单图标：</label>
                        </th>
                        <td>
                            <label id="Icon2" />
                        </td>

                    </tr>
                    <tr>
                        <th>
                            <label for="Seq2">排序：</label>
                        </th>
                        <td>
                            <label id="Seq2" />
                        </td>

                        <th>
                            <label for="FunctionId2">功能ID：</label>
                        </th>
                        <td>
                            <label id="FunctionId2" />
                        </td>

                    </tr>
                    <tr>
                        <th>
                            <label for="Visible2">菜单可见：</label>
                        </th>
                        <td>
                            <label id="Visible2" />
                        </td>

                        <th>
                            <label for="WinformType2">Winform窗体类型：</label>
                        </th>
                        <td>
                            <label id="WinformType2" />
                        </td>

                    </tr>
                    <tr>
                        <th>
                            <label for="Url2">Web界面Url地址：</label>
                        </th>
                        <td>
                            <label id="Url2" />
                        </td>

                        <th>
                            <label for="WebIcon2">Web界面的菜单图标：</label>
                        </th>
                        <td>
                            <label id="WebIcon2" />
                            <div id="imgIcon2" class="icon-blank" style="width:24px;height:24px"/>
                        </td>

                    </tr>
 
                    <tr>
                        <td colspan="4" style="text-align:right; padding-top:10px">
                            <input type="hidden" id="ID2" />
                            <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#DivView').dialog('close')">关闭</a>
                        </td>
                    </tr>
                </table>
        </form>
    </div>
</body>
</html>
